<template>
    <div id="all">
        <Online v-if="isLogin"></Online>
        <Regist v-else></Regist>
    </div>
</template>

<script>
import Regist from '@/components/Regist.vue'
import Online from '@/components/Online.vue'
import {mapState,mapGetters} from "vuex";
export default{
    data:function(){
        return{

        }
    },
    components:{
        Regist,
        Online
    },
    mounted:function(){
        this.$store.dispatch("requestIsLogin");
    },
    computed:{
        ...mapState([
            "isLogin"
        ])
    }
}
</script>

<style scoped>
    #all{
        background-color: white;
    }
</style>